#ifndef VMMMS_H
#define VMMMS_H 

#ifdef __cplusplus
extern "C" {
#endif

#include "vmsys.h"

/**
 * Path of XML file.
 */
#define MAX_MMS_APP_NAME_LEN  100

typedef enum
{
	VM_MMS_FAIL = -2,                                   		 /*Request error*/     
     	VM_MMS_MEMORY_NOT_ENOUGH = -1,    		 /*Not enough memory*/
      	VM_MMS_SUCCESS							 /*Success*/
 }vm_mms_result_enum;

typedef enum
{
	VM_MMS_TYPE_SMIL_MMS = 0,       			 /*SMIL XML type*/
	VM_MMS_TYPE_MIXED_MMS          				 /*MIXED XML type*/
}vm_mms_type_enum;

typedef enum
{
	VM_MMS_SIM_ID_SIM1 = 1,          			 	 /*sim1 card*/
	VM_MMS_SIM_ID_SIM2                 				 /*sim2 card*/
}vm_mms_sim_id_enum;

typedef struct
{
	VMUWCHAR xml_filepath[MAX_MMS_APP_NAME_LEN];/*Path of XML file*/
	VMUINT xml_size;							 /*Size of XML file*/
	VMUINT8 mms_type;                    				 /*refer to vm_mms_type_enum.*/
	VMUINT8 sim_id;                        				 /*refer to vm_mms_sim_id_enum.*/
}vm_send_mms_req_t;


/**
 *	Type definition of MMS callback function.
 *
 *    @param result   result, refer to vm_mms_result_enum.
 */
typedef void (*vm_mms_callback_type)(VMINT  result);

/**
 * Send MMS. The result will be returned by callback function.
 *
 * @param req_ptr		MMS info to send, refer to vm_send_mms_req_t.
 * @param callback	Callback function.
 *
 * @return	FALSE: Failed; TRUE: Success.
 */
VMINT vm_mms_send_mms(vm_send_mms_req_t * req_ptr,  vm_mms_callback_type callback);

/**
 * Cancel to send MMS. 
 * Before this, vm_mms_send_mms should be called to put MMS into queue to send one by one.
 * This funtion delete the current sending MMS from sending queue.
 * If vm_mms_send_mms is not called or the callback function is already invoked, 
 * This cancel operation would not take effect.
 */
void vm_mms_cancel_send_mms(void);


#ifdef __cplusplus
}
#endif

#endif








